<?php   
session_start(); //to ensure you are using same session
session_destroy(); //destroy the session
//echo '<meta http-equiv="refresh" content="0.1;url=index.php">'; //to redirect back to "index.php" after logging out
header('Location:index.php');
exit();
?>